package com.develop.skwen.electricgomall.util;

import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;

/**
 * Created by skwen on 2018/7/8.
 */

public class SpaceItemDecoration extends RecyclerView.ItemDecoration {

    private int decor;


    public SpaceItemDecoration(int decor){
        this.decor =decor;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        super.getItemOffsets(outRect, view, parent, state);

        outRect.bottom = decor;
        outRect.right = decor;
        outRect.left = decor;
    }
}
